#pragma once

/* 
*	Purpose: To display a GUI panel on the screen with additional features.
*			The reference ID relates to a unit, a building, etc.  So if you
*			click the button, then you will go to that unit that the button references.
*/

#include "Globals.hpp"
#include "UIElement.h"
#include "ClippingPlane.h"


class GUIPanelButton : public UIElement
{
public:
	GUIPanelButton();

	bool GetBounds(int x, int y);

	void Update(); // Keeps the GUIPanelButton on the screen

	inline void SetDrawRect(bool condition) {m_drawRect = condition;}
	inline bool GetDrawRect() {return m_drawRect;}

	void SetReferenceID(int id) {m_referenceID = id;}
	int GetReferenceID() {return m_referenceID;}

	void SetImages(const char* normal, const char* mouseOver);
	void SwapImages(bool setNormal);

private:

	int m_referenceID; // If this button is clicked, then what ID / action does it need to trigger?
	bool m_drawRect, m_imagesSet;
	string m_mouseOverImage, m_normalImage;

	Coords previous_update; // This is the coordinates of where the upper left hand corner of the screen was on the most recent Update() call

};